Skip to main content

Week 6

Milestones

  • Implement ImageOutputPlugin: Create a module to generate images using the canvas library, customize image content, and save them as image files.
  • Update Controller Logic: Integrate image generation into the controller's generateDocument method by adding a condition for the output type 'IMG'.
  • Test Image Generation: Rigorously test the image generation process to ensure it produces valid images and handles potential errors gracefully.
  • Verify Endpoints: Confirm that the new endpoints for generating images function as intended and return the generated image files as expected.

Screenshots / Videos

Contributions

https://github.com/Samagra-Development/Doc-Generator/pull/165

Learnings

  • Integration of External Libraries: Learned how to integrate external libraries like canvas for image generation and manipulation within a Nest.js application.
  • Controller Logic Enhancement: Gained experience in enhancing controller logic to accommodate multiple output types, enabling the generation of images alongside other document formats.